# Maintainer: David Runge <dvzrv@archlinux.org>
# Contributor: Filipe Laíns (FFY00) <lains@archlinux.org>

pkgname=liburing
pkgver=2.3
_commit=b3d94289ca64449a5018986d0b3baddcb78d7799  # refs/tags/liburing-2.3
pkgrel=1
pkgdesc="Linux-native io_uring I/O access library"
arch=(x86_64)
url="https://git.kernel.dk/cgit/liburing/"
license=(LGPL2.1 MIT)
depends=(glibc)
makedepends=(git)
provides=(liburing.so)
source=(git+https://git.kernel.dk/liburing#tag=$_commit?signed)
sha512sums=('SKIP')
validpgpkeys=(C0FC392DCADE26D975FA5E4AF7D358FB2971E0A6)  # Jens Axboe <axboe@kernel.dk>

build() {
  cd $pkgname
  ./configure \
    --prefix=/usr \
    --mandir=/usr/share/man
  make
}

package() {
  make DESTDIR="$pkgdir" install -C $pkgname
  install -vDm 644 $pkgname/LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
}
